Solution:
a1 = 14 a10 = 50 n = 10 s10 = ((a1 + a10) / 2) * n print(f'The sum of the first 10 elements in a sequence: {s10}')